package com.depin.pdaapp.presenter;

import com.depin.pdaapp.http.NetBiz;
import com.depin.pdaapp.utils.RxSubscriber;
import com.jaydenxiao.common.base.BasePresenter;
import com.jaydenxiao.common.basebean.BaseRespose;
import com.vondear.rxtool.view.RxToast;

/**
 * Created by 哼哼
 * Date：2020/8/9 12:19
 * Desc:
 */
public class ZTPresenter extends BasePresenter<ZTPresenter.View> {
    public interface View {
        void zutao(BaseRespose baseRespose);
    }

    public void zutao(String qrcode, String province, String city, String district, String province1, String city1, String district1, String ship_address, String rec_address, String in_time, String in_address, String out_time, String out_address, String batch, String fh_time) {
        mRxManage.add(new NetBiz().zutao(qrcode, province, city, district, province1, city1, district1, ship_address, rec_address, in_time, in_address, out_time, out_address, batch, fh_time).subscribe(new RxSubscriber<BaseRespose>(mContext) {
            @Override
            protected void _onNext(BaseRespose baseRespose) {
                mView.zutao(baseRespose);
            }

            @Override
            protected void _onError(String message) {
                RxToast.showToast(message);
            }
        }));
    }

}